In the prior art, an index-type file system usually divides the storing region of a storing device into a metadata storing region and a data storing region. The metadata storing region is used to store metadata corresponding to the number of files, and the data storing region is sub-divided into data blocks of a fixed block size.
When a file is to be stored, firstly a single metadata and a plurality of data blocks are allocated to this file. The single metadata is mainly used to record attributes of the file (e.g., whether it is readable and writable, the user, the group to which it belongs, the accessing time and etc.) and locations of the data blocks in the storing device. Accordingly, each file has a single metadata and at least one data block corresponding to this file.
However, for such a file system structure, there is a problem that, if the number of small-sized files is too great, the metadata storing region might become insufficient due to the great number of metadata while the data storing region is still in surplus. Similarly, if the number of large-sized files is too great, the data storing region might become insufficient while the metadata storing region is still in surplus due to the small number of metadata. Obviously, such a file system leads to a poor average utilization efficiency of the storing device.
Further, the data blocks divided in the data region is fixed instead of being variable in such a file system. Therefore, in case of a file which has a size that just exceeds the size of one data block (or a multiple thereof), then the system must allocate an additional data block to this file. Because the additionally allocated data block is only used to store a small amount of data and the remaining space cannot be used for other files, a waste in space will be caused when the number of such files and probabilities of using this storage mechanism increase.
On the other hand, in the conventional storing devices, the file system is designed in such a way that a file must be stored in consecutive block spaces because of the physical property of the devices. Thus, if the file is increased in size due to data variation but the consecutive data block spaces originally used for storing the file becomes insufficient, the file must be moved to incur a cost of file movement.
Accordingly, an urgent need exists in the art to provide a novel file system architecture in which a more efficient file storing mechanism is used in combination with a newly developed storing device to improve the file accessing efficiency and to make an improvement on the drawbacks of the prior art.